home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Enlighten DSM 1.1
/
SGI EnlightenDSM 1.1.iso
/
sunos41x
/
flexlm.z
/
flexlm
/
FLEXlm
/
start_dsmld
< prev
next >
Wrap
Text File
|
1998-07-01
|
2KB
|
70 lines
#!/bin/sh
#
# Script: start_dsmld
#
# This script will start enlighten license daemon dsmld using the license file
# license.dat
#
# Copyright (c) 1990-1998 Enlighten Software Solutions, Inc.
#
app_name="start_dsmld"
emd_dir=`egrep "^emd_dir=" /etc/enlighten | cut "-d=" -f2-`
if [ -z "$emd_dir" -o ! -d "$emd_dir" ] ; then
echo "$app_name: Could not find the EMD directory." 1>&2
echo "$app_name: Unable to start license daemons." 1>&2
exit 1
fi
flex_dir="${emd_dir}/FLEXlm"
lmgrd="${flex_dir}/lmgrd"
if [ ! -x $lmgrd ] ; then
echo "$app_name: Unable to find $lmgrd." 1>&2
echo "$app_name: Unable to start license daemons." 1>&2
exit 1
fi
lic_file="${flex_dir}/license.dat"
if [ ! -f $lic_file ] ; then
echo "$app_name: Unable to find $lic_file." 1>&2
echo "$app_name: Unable to start license daemons." 1>&2
exit 1
fi
log_file="${flex_dir}/lmgrd.log"
#
# Start the license daemons
#
if [ ! -x ${flex_dir}/lmutil ] ; then
echo "$app_name: Unable to verify if license daemons are running." 1>&2
else
# See if daemons are already up
lmgrdstat=`$flex_dir/lmutil lmstat -c $lic_file | egrep ": license server" | awk '{print $4}'`
# If lmgrd is not running, start it up
if [ "$lmgrdstat" != UP ] ; then
$lmgrd -c $lic_file -l $log_file
else
# Issue a reread
${flex_dir}/lmutil lmreread -c $lic_file
fi
sleep 3
lmgrdstat=`$flex_dir/lmutil lmstat -c $lic_file | egrep ": license server" | awk '{print $4}'`
dsmldstat=`$flex_dir/lmutil lmstat -c $lic_file | egrep "^ *$dsmld" | awk '{print $2}'`
if [ "$lmgrdstat" != "UP" -a "$dsmldstat" != "UP" ] ; then
echo "$app_name: License daemons failed to start." 1>&2
echo "$app_name: See $log_file for details." 1>&2
exit 1
fi
fi
exit 0